var $ = require("jquery");
require("jquery.cookie");
var model = require('../model/user.js');
var view = require('../view/history.js');

base.checklogin();

var course = parseInt($.cookie('course'));
var sessionid = $.cookie('sessionid');


model.getHisScores(sessionid, course, function(data) {
	if (data.status && data.status == 401) { //未登录
		location.href = "login.html";
	}
	view.render(data);
});